Installation of the module has been made as simple as possible and shouldn't take long for any stores which have not already modified any of the template files or core files which this module has to modify.
If any of the template files or core files this distribution have already been modified (because of another third party module being installed) then the changes for the respective files should be applied manually by copying across the appropriate sections of code required for the Tax Declaration module. These sections are clearly marked (with “// BEGIN” and “// END” comments) within the sample files provided in this distribution.
These are the new files which make up this module. Copy them all into their respective folders in the Zen Cart installation.
Most Zen Cart stores have their admin directory renamed from the default of “admin”.
Copy all of the folders and files from the files/admin folder into the store's “admin” directory, whatever it is called.
The files are already in the correct directory structure, so a single drag-and-drop of the folders/files in the files/admin folder into the “admin” directory for the store will put the files in the correct locations.
Please do not copy the files individually - there's simply no need - doing so often results in files being missed out!
Copy the includes folder from the files folder into the store's main directory.
The files are already in the correct directory structure, so a single drag-and-drop of the folder into the root directory for the store will put the files in the correct locations.
Please do not copy the files individually - there's simply no need - doing so often results in files being missed out!
Warning: Be careful NOT to copy the files from the files/includes folder into the store's admin/includes directory, they go in the includes directory which is alongside, not inside the store's admin directory.
Many of the standard Zen Cart template files require modifications to work with this module.
These modifications have been made to “fresh” copies of the template files from a “clean” installation of Zen Cart and are included as sample files in this distribution.
If any of these template files haven't already been modified for the store, the sample files included in this distribution can be copied into the store's template directory and will then override the standard versions of the files included in the Zen Cart distribution.
If any of these template files have already been modified for the store, then the changes necessary for the Tax Declaration module to function must be made to the store's modified file(s). The changes are clearly marked within the sample files in the distribution and should be easy enough to copy across, especially if a “diff” software package (such as the free WinMerge or the excellent, commercial, Beyond Compare) is used.
Instructions on how to copy across the modifications necessary for this module - to template files which have previously been modified - can be found in this FAQ.
An image also needs to be copied into the appropriate folder for your template.
The sample template files can be found within the template_override_files folder in the distribution. They are:
Some of the store's module files have to be “overridden” so that their code is run instead of the standard code for the cart, to add the Tax Declaration column to product listings.
The standard code can be overridden simply by copying the files into the modules directory for the store's template.
The override module files can be found within the core_override_files folder in the distribution. They are:
Some of the language definitions have to be overridden so that the additional text needed to provide information about Tax Declarations can be displayed.
These definitions can be added simply by copying the files into the store's template directory for the appropriate language.
The additional template files can be found within the language_override_files folder in the distribution. They are:
A few core Zen Cart files must be updated to work with the Tax Declaration module.
It is likely that none of these files have been modified for the store already, in which case the modified files from this distribution, for the version of Zen Cart being used by the store, should simply be copied over the existing version of the files.
As with the template files in a previous step, if any of the these core files have already been modified for the store, the changes within the modified sample files included in this distribution must be applied to the previously modified core files.
The modified core files can be found within the core_modified_files folder in the distribution. A list of the files follows.
An SQL script, tax_declaration.sql, is provided with this module to modify the store's database tables to work with this module and to add the various configuration options this module offers.
The easiest option is to go to Tools > Install SQL Patches in the Zen Cart Admin, select Browse..., find and select the file tax_declaration.sql on your computer, then click Upload.
Or software such as PHPMyAdmin can be used to run the SQL script (Care must be taken to check the name of the tables. If the store uses a prefix for the table names it is essential that this prefix is put in front of the table names).
The Tax Declaration requires customisation of some of its text in the language defines, according to the store's needs.
One thing that every store should update is the store's address for the declaration in its admin language definition file: admin/includes/languages/english/tax_declaration.php - this file should be edited directly.
Now all that has to be done is to apply the tax declaration settings for the various products for the store in the Zen Cart Admin.